export const UserRuleValidate = () => {
    let UserRuleValidate = {
        name: [
            {required: true, message: '名称不能为空', trigger: 'blur'}
        ],
        work: [
            {required: true, message: '登录名不能为空', trigger: 'blur'}
        ],
        password: [
            {required: true, message: '密码不能为空', trigger: 'blur'},
            {type: 'string', min: 6, message: '最小长度为6位', trigger: 'blur'}
        ],
        telephone: [
            {type: 'string', min: 11, max: 11, message: '请真确填写电话', trigger: 'blur'}
        ],
        email: [
            {type: 'email', message: '请填写正确邮箱', trigger: 'blur'}
        ],
        userGroup: [
            {required: true, type: 'array', min: 1, message: '最少选一个', trigger: 'change'},
            {type: 'array', message: '最多能选2个', trigger: 'change'}
        ],
        collegeId: [
            {required: true, type: 'string',  message: '所属学院不能为空', trigger: 'change'}
        ],
        roleId: [
            {required: true, type: 'number', message: '角色不能为空', trigger: 'change'}
        ]
    }
    return UserRuleValidate;
}

export const AddTeacherRuleValidate = () => {
    let AddTeacherRuleValidate = {
        worker: [
            {required: true, message: '工号不能为空', trigger: 'blur'}
        ],
        name:[
            {required: true, message: '名称不能为空', trigger: 'blur'}
        ],
        sex:[
            {required: true, message: '性别不能为空',type:'string' ,trigger: 'change'}
        ],
        position:[
            {required: true, message: '职称不能为空', trigger: 'blur'}
        ],
        collegeId:[
            {required: true, message: '学院不能为空',trigger: 'blur'}
        ],
    }
    return AddTeacherRuleValidate;
}

export const AddCodeRuleValidate = () => {
    let AddCodeRuleValidate = {
        codeType: [
            {required: true, message: '类型不能为空', trigger: 'change'}
        ],
        codeName: [
            {required: true, message: '名称不能为空', trigger: 'blur'}
        ],
        codeTheCode:[
            {required: true, message: '代码类型不能为空', trigger: 'change'}
        ]
    }
    return AddCodeRuleValidate;
}

export const AddCollegeRuleValidate = () => {
    let AddCollegeRuleValidate = {
        name: [
            {required: true, message: '类型不能为空', trigger: 'change'}
        ],
        code: [
            {required: true, message: '名称不能为空', trigger: 'blur'}
        ]
    }
    return AddCollegeRuleValidate;
}

export const AddProfessionalRuleValidate = () => {
    let AddProfessionalRuleValidate = {
        name: [
            {required: true, message: '名称不能为空', trigger: 'change'}
        ],
        schoolMajorCode: [
            {required: true, message: '专业代码不能为空', trigger: 'blur'}
        ]
    }
    return AddProfessionalRuleValidate;
}

export const AddSCRuleValidate = () => {
    let AddSCRuleValidate = {
        name: [
            {required: true, message: '学年不能为空', trigger: 'change'}
        ],
        term: [
            {required: true, message: '学期不能为空', trigger: 'change'}
        ],
        startTime: [
            {required: true, message: '开始时间不能为空',type:'date'}
        ],
        endTime: [
            {required: true, message: '结束时间不能为空',type:'date'}
        ],
    }
    return AddSCRuleValidate;
}

export const AddTimetableRuleValidate = () => {
    let AddTimetableRuleValidate = {

    }
    return AddTimetableRuleValidate;
}
